﻿@model BDSimpleStatus.Models.ServerCheckModel

<div id="editorwrap">
    @using (Html.BeginForm()) {
        @Html.ValidationSummary(true)
            <div class="editor-label">
                @Html.LabelFor(model => model.Name)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.URL)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.URL)
                @Html.ValidationMessageFor(model => model.URL)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.Description)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </div>

            <div class="checkwrap">
                <div class="editor-label">
                    @Html.LabelFor(model => model.CheckPing)
                </div>
                <div class="editor-field center">
                    @Html.EditorFor(model => model.CheckPing)
                    @Html.ValidationMessageFor(model => model.CheckPing)
                </div>
            </div>

            <div class="checkwrap">
                <div class="editor-label">
                    @Html.LabelFor(model => model.CheckHttp)
                </div>
                <div class="editor-field center">
                    @Html.EditorFor(model => model.CheckHttp)
                    @Html.ValidationMessageFor(model => model.CheckHttp)
                </div>
            </div>
        
            <div class="leftfloat">
                <div class="editor-label">
                    @Html.LabelFor(model => model.Frequency)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.Frequency)
                    @Html.ValidationMessageFor(model => model.Frequency)
                </div>
            </div>
            <br class="clearleft" />
            <div class="leftfloat">
                <div class="editor-label">
                    @Html.LabelFor(model => model.NextCheckDate)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.NextCheckDate)
                    @Html.ValidationMessageFor(model => model.NextCheckDate)
                </div>
            </div>
            <div class="leftfloat">
                <div class="editor-label">
                    @Html.LabelFor(model => model.LastCheckDate)
                </div>
                <div class="editor-field">
                    @Html.Label(Model.LastCheckDate.ToString())
                    @Html.HiddenFor(model => model.LastCheckDate)
                </div>
            </div>
            <br class="clearleft" />
            <div class="editor-label">
                @Html.LabelFor(model => model.IsEnabled)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.IsEnabled)
                @Html.ValidationMessageFor(model => model.IsEnabled)
            </div>
            <div class="leftfloat">
                <div class="editor-label">
                    Last ping check result:
                </div>
                <div class="editor-field">
                    @Html.Label(Model.IsPingOk.ToString())
                </div>
            </div>
            <div class="leftfloat">
                <div class="editor-label">
                    Last http check reasult:
                </div>
                <div class="editor-field">
                    @Html.Label(Model.IsHttpOk.ToString())
                </div>
            </div>
            <br class="clearleft" />
            <p class="submitwrap">
                <input type="submit" value="Save" />
            </p>
    }
</div>